#include"Fifo.hpp"
#include"Shm.hpp"

int main()
{
    Shm shm(PATH,projid,Type::CREATER);
    shm.Attr();
    NamedFifo fifo(PATH,FILENAME);

    FileOper readerfile(PATH, FILENAME);
    readerfile.OpenForRead();

    //获取共享内存起始
    char *mem=(char*)shm.VirtualAddr();
    while(true)
    {
        if(readerfile.Wait())
        {
            printf("%s\n", mem);
        }
        else break;
    }
    return 0;
}